<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0, user-scalable=no">
  </head>
  <body>
      <script>
        //求员工的工资
        // getSalary(12000, 2000) 
        // getSalary(15000, 3000)
        // getSalary(15000, 4000) 
//为不同级别的员工计算工资,传入基本工资加绩效
        function makeSalary(base) {
          return function (performance) {
            return base + performance
          }
        }
        let salaryLever1 = makeSalary(12000)
        let salaryLever2 = makeSalary(15000)

        console.log(salaryLever1(2000))
        console.log(salaryLever2(2000))
      </script>
  </body>
</html>
